<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>WeChat</title>
    <link rel="stylesheet" href="../../model/jsFn.css">
</head>
<body>
<div class="catalog">
    <h1>目录</h1>
    <ul>
        <li>
            <p><a href="#profile">WeChat</a></p>
            <ul>
                <li><p><a href="#jsFn_login">   login-------微信登录</a></p></li>
                <li><p><a href="#jsFn_share">   share-------微信分享</a></p></li>
            </ul>
        </li>
    </ul>
</div>
<div id="profile">
    <h2>对象简介:</h2>
    <p>友盟第三方SDK提供微信登录功能</p>
</div>
<div class="jsFnModel" id="jsFn_login">
    <h3>login:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>WeChat.login(context) ->promise</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>初始化语音聊天服务</p>
    </div>
    <div class="version">
        <p>稳定性;2 - 稳定的</p>
        <p>新增于:v0.0.0</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <ul>
            <li>
                <p>context</p>
                <p>&nbsp;object&nbsp;</p>
                <p>当前页面上下文,指定一个页面跳转到微信,并在指定的页面接收微信的同步返回结果</p>
            </li>
        </ul>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>promise</p>
        <p>成功：res(user);user.img:用户头像；user.openid:用户ID;user.name:用户昵称；<br/>失败：rej(e); e:失败信息</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                WeChat.login(document).then((res)=>{
                    sp.put(res);
                    document.finish();
                });
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="jsFnModel" id="jsFn_share">
    <h3>share:</h3>
    <div class="shape">
        <h3>函数使用样式</h3>
        <p>WeChat.share(context,object) ->promise</p>
    </div>
    <div class="profile">
        <h3>函数功能简介</h3>
        <p>友盟SDK提供的第三方分享到微信好友和微信朋友圈的功能</p>
    </div>
    <div class="version">
        <p>稳定性;2 - 稳定的</p>
        <p>新增于:v0.0.0</p>
    </div>
    <div class="params">
        <h3>参数列表:</h3>
        <ul>
            <li>
                <p>context</p>
                <p>&nbsp;obejct&nbsp;</p>
                <p>当前页面上下文,指定一个页面跳转到微信,并在指定的页面接收微信的同步返回结果</p>
            </li>
            <li>
                <p>object</p>
                <p>&nbsp;obejct&nbsp;</p>
                <p>分享的相关内容，格式：{type:分享类型,url:网页地址,title:标题,detail:描述,imageUrl:缩略图}</p>
            </li>
        </ul>
    </div>
    <div class="res">
        <h3>返回值:</h3>
        <p>promise</p>
        <p>res():成功回调结果;rej(e):失败回调结果;</p>
    </div>
    <div class="code">
        <h3>例子</h3>
        <pre>
            <code>
                WeChat.share(document,{type:"微信好友",url:"https://mp.weixin.qq.com/s/3kDQdpptZNjbwbDWrj3ybg",title:"证念",detail:"证念分享",
                imageUrl:"http://a2.qpic.cn/psb?/V12lwpNt3cFK8L/wkTn6juQI9hFEn8uWkg53MnSPz9w1nIB6h5MBZNXDDk!/b/dD8BAAAAAAAA&bo=DAOQAQAAAAARAKk!&rf=viewer_4"}).then((res)=>{
                    alter("分享成功");
                });
            </code>
        </pre>
    </div>
    <div class="error">
        <h3>抛出错误</h3>
    </div>
</div>
<div class="author">
    <p>by-沛华</p>
</div>
</body>
</html>